{layout name="public::layout" /}

<h4 class="text-center text-success">编辑文章</h4>

<form class="form-horizontal" action="{:url('article/doEdit')}" method="post" id="login" enctype="multipart/form-data">
    <input type="hidden" name="id" value="{$artInfo.id}">
    <div class="form-group">
        <label for="title" class="control-label">标题</label>
        <div>
            <input type="text" name="title" class="form-control" id="title" value="{$artInfo.title}">
        </div>
    </div>

    <div class="form-group">
        <label for="cate_id" class="control-label">分类</label>
        <select name="cate_id" id="cate_id" class="form-control">
            {volist name="cateList" id="cate"}
            <option value="{$cate.id}">{$cate.name}</option>
            {/volist}
        </select>
    </div>

    <div class="form-group">
        <label for="content" class="control-label">内容</label>
        <textarea class="form-control" name="content" id="content" style="min-height: 250px">
            {$artInfo.content}
        </textarea>
    </div>

    <img src="http://phpwebtest.com:8888/tp5_c/public//uploads/{$artInfo.title_img}" class="img-rounded" width="100px"></img>
    <div class="form-group">
        <label for="title_img" class="control-label">标题图片</label>
        <div>
            <input type="file" name="title_img" class="form-control" id="title_img" placeholder="标题图片">
        </div>
    </div>

    <div class="form-group">
        <button type="submit" class="btn btn-primary" id="register">保存</button>
    </div>
</form>